#ifndef XGE_UNITTEST_XTYPE_H_
#define XGE_UNITTEST_XTYPE_H_
#include "xunit_test.h"
#include "xtype.h"
#include "xassert.h"
#include <stdio.h>


using xge::Point;
using xge::Rect;

UNIT_TEST(XTYPETEST,Case1) {

	Point point1 , point2 , point3 ;

	XASSERT(point1.ToPoint(_xT("(1.998,3.778)")));
	wprintf(_xT("%s\n"),point1.ToString().c_str());

	XASSERT(point1.ToPoint(_xT("(2.0,3.0)")));
	wprintf(_xT("%s\n"),point1.ToString().c_str());

	XASSERT(point2.ToPoint(_xT("(3.0,1.0)")));
	wprintf(_xT("%s\n"),point2.ToString().c_str());

	XASSERT(!point3.ToPoint(_xT("3.1 1.2")));
	wprintf(_xT("%s\n"),point3.ToString().c_str());


	::getchar();

}

UNIT_TEST(XTYPETEST,Case2) {
	Rect r1;

	XASSERT(r1.ToRect(_T("(1.9,3.4) (1.2223,3.442)")));
	wprintf(_xT("%s\n"),r1.ToString().c_str());

	XASSERT(r1.ToRect(_T("(11.91,13.4)(12.2223,3.442)")));
	wprintf(_xT("%s\n"),r1.ToString().c_str());

	::getchar();
}




#endif// XGE_UNITTEST_XTYPE_H_